package com.magold.io;

import java.io.IOException;
import java.io.InputStream;

import org.xml.sax.SAXException;

public interface XMLHelper {
	
	/**
	 * parse XML file to a document resource.
	 * 
	 * @param in
	 * @param autoClose
	 * @throws IOException
	 * @throws SAXException
	 */
	public void init(InputStream in, boolean autoClose) throws SAXException, IOException;
	
	/**
	 * set currNode to currNode's parent node.
	 *
	 * @return if current node is document node.
	 */
	public boolean moveToParent();
	
	/**
	 * set currNode to the element which is currNode's childNode && named elementName.
	 * 
	 * @param elementName
	 * @return false if no such specified element.
	 */
	public boolean moveToChild(String name);
	
	/**
	 * reset cursor to document node.
	 * 
	 */
	public void resetCursor();
	
}
